﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class OrderManagement : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Panel2.Visible = true;
        Panel1.Visible = false;
    }
    protected void DetailsView1_PageIndexChanging(object sender, DetailsViewPageEventArgs e)
    {

    }
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void TextBox1_TextChanged(object sender, EventArgs e)
    {

    }
    protected void Calendar1_SelectionChanged(object sender, EventArgs e)
    {
        TextBox t = (TextBox)DetailsView1.FindControl("TextBox1");
        Calendar c = (Calendar)DetailsView1.FindControl("Calendar1");

        t.Text = Convert.ToString(c.SelectedDate);
        c.Visible = false;

    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Calendar c = (Calendar)DetailsView1.FindControl("Calendar1");
        c.Visible = true;


    }
    protected void Button3_Click(object sender, EventArgs e)
    {
        Calendar c = (Calendar)DetailsView1.FindControl("Calendar2");
        c.Visible = true;
    }
    protected void Calendar2_SelectionChanged(object sender, EventArgs e)
    {
        TextBox t = (TextBox)DetailsView1.FindControl("TextBox2");
        Calendar c = (Calendar)DetailsView1.FindControl("Calendar2");

        t.Text = Convert.ToString(c.SelectedDate);
        c.Visible = false;

    }
    protected void Button4_Click(object sender, EventArgs e)
    {
        Panel2.Visible = false;
        Panel1.Visible = false;
    }
    protected void Button5_Click(object sender, EventArgs e)
    {
        Calendar c = (Calendar)GridView1.Rows[0].FindControl("Calendar3");
        c.Visible = true;

    }
    protected void Calendar3_SelectionChanged(object sender, EventArgs e)
    {
        TextBox t = (TextBox)GridView1.Rows[0].FindControl("TextBox3");
        Calendar c = (Calendar)GridView1.Rows[0].FindControl("Calendar3");

        t.Text = Convert.ToString(c.SelectedDate);
        c.Visible = false;

    }
    protected void Button6_Click(object sender, EventArgs e)
    {
        Calendar c = (Calendar)GridView1.Rows[0].FindControl("Calendar4");
        c.Visible = true;

    }
    protected void Calendar4_SelectionChanged(object sender, EventArgs e)
    {
        TextBox t = (TextBox)GridView1.Rows[0].FindControl("TextBox4");
        Calendar c = (Calendar)GridView1.Rows[0].FindControl("Calendar4");

        t.Text = Convert.ToString(c.SelectedDate);
        c.Visible = false;
    }
}